using I2.Loc;
using UnityEngine;

public class TutorialStepLookAround : TutorialBase
{
	private TutorialButton btnRotate;

	private GameObject objUkazatel;

	private bool isLookAround;

	public override void OnStart()
	{
		base.OnStart();
		btnRotate = CameraZoneEnabler.GetCameraZone().GetComponent<TutorialButton>();
		base.gameObject.SetActive(true);
		TutorialCollider.instance.curCollider = TutorialCollider.TypeCollider.Start;
		StepRotate();
		TutorialManager.instance.stepTutorialForFlurry = "3 Look Around ";
	}

	public override void OnStop()
	{
		HideText();
		base.OnStop();
	}

	public override void OnUpdate()
	{
		if (btnRotate.isPlayAnim && btnRotate.dragComplete && !isLookAround)
		{
			isLookAround = true;
			Invoke("OnComplete", 1.5f);
		}
	}

	public override void OnComplete()
	{
		PointerController.instance.AddPointer(TutorialManager.instance.tony.transform, 0f, "iconMap_Red Cercle", false);
		base.OnComplete();
	}

	private void StepRotate()
	{
		ShowText(ScriptLocalization.Get("Tutorial/src_Tutorial_Look_Around"), 100000f);
		TutorialManager.instance.PlayAnimButton(TutorialButtonId.rotate, TutorialManager.instance.animBtnRotate);
		if (btnRotate == null)
		{
			TutorialManager.instance.EndTutorial();
			return;
		}
		btnRotate.moveComplete = false;
		btnRotate.dragComplete = false;
		btnRotate.startDetectDrag = true;
		isLookAround = false;
	}

	private void StepFinal()
	{
		ShowText(ScriptLocalization.Get("Tutorial/src_Tutorial_Shoot_InEye"), 100000f);
	}
}
